1. Field of the Invention
The present invention relates to a robot control device for controlling a robot.
2. Description of the Related Art
A position and posture of a robot are preferably controlled in an accurate way so as to be a desired state. It is conventionally known that arm driving devices for driving joint parts and the like are provided with encoders for detecting rotation angles of rotation axes of driving motors to improve accuracy of the positions and postures of robots. It is known that the driving motors of the arm driving devices are controlled based on outputs from the encoders.
As for the encoders for detecting rotation angles of rotation axes, incremental encoders and absolute encoders are known. An absolute encoder can detect an absolute rotation angle with respect to a predetermined reference position. However, the absolute encoder may not be able to detect a rotation angle exceeding a predetermined rotation angle range. For example, when the rotation axis makes one rotation from a position of 1 degree, the rotation angle to be detected is not 361 degrees but 1 degree. Therefore, when the rotation angle exceeding the predetermined rotation angle range is detected, it is preferable that the number of rotations of the rotation axis be stored in another device.
Japanese Laid-open Patent Publication No, 59-226806 discloses an absolute position detector in which two rotation angle detectors are connected to an output shaft of a motor. Rotational speed ratios of these rotation angle detectors are slightly different. It is described that the absolute position detector detects a rotation angle exceeding a detectable range of the rotation angle detectors by a difference between detected angles of the two rotation angle detectors.
Japanese Patent No. 3429414 describes an infinite rotation control method in a robot provided with an infinite rotation control means including a spin encoder. In this patent publication, it is disclosed that the number of rotations N of the output shaft of the driving means and the number of rotations M of the rotation axis is used to set to the rotation ratio N/M, and when the output shaft rotates N rotations, a counted value of the infinite rotation control means increases by M.
The arm driving device is equipped with a reducer to amplify rotational force of the driving motor. Backlashes between gears in the reducer, torsion of the input shaft or the output shaft of the reducer, and the like are factors that deteriorate the accuracy of the position and posture of the robot. Therefore, as a method for highly accurately detecting the rotation angle of the driving shaft of the robot, a second encoder can be mounted on the output shaft of the reducer in addition to a first encoder disposed on the rotation axis of the driving motor. The second encoder can detect the rotation angle of the output shaft of the reducer. Amounts of influence such as the backlash of the reducer are detected based on the output from the second encoder, and control of the driving motor can be corrected.
When the robot control device is in a driving state, the encoder detects the rotation angle, and the rotation angle can be stored in the robot control device. When the robot control device is in a stop state, i.e. in a state that the power source is shut down, the rotation angle of the rotation axis cannot be detected, and the detected rotation angle cannot be stored. In some cases, the rotation axis is rotated by coasting after the robot control device is stopped, and a position of the output shaft of the reducer is changed for maintenance of the robot when the robot control device is in the stop state. In such cases, the rotation angle of the rotation axis may not be accurately detected after the robot control device is started. In particular, if the stored number of rotations is lost by the stop of the robot control device, the number of rotations may be determined as zero after the robot control device is started.
If the robot control device is stopped, a backup power source for supplying electricity to the encoder during the stop period of the robot control device can be used for enabling the encoder to detect the rotation angle exceeding the predetermined rotation angle range. Since the backup power source supplies electricity to the encoder and the storage device, detection and storage of the rotation angle can be continued during the stop period of the robot control device.
However, when the second encoder is mounted on the output shaft of the reducer, the backup power source of the second encoder is required in addition to the backup power source of the first encoder. Alternatively, when the backup power source includes a storage battery, and a power storage amount of the storage battery becomes zero, information of the rotation angle may be lost.
The device described in the above-described Japanese Laid-open Patent Publication No. 59-226806 can detect the rotation angle exceeding a predetermined range without using the backup power source. However, the rotational speed ratio depends on the robot mechanism in the device, and thus the device cannot be changed to a configuration in which the rotational speed ratio is slightly different. For example, the reducer in which the output shaft makes about one rotation with respect to 100 rotations of the input shaft is often used in the robot. However, there is a problem that a detectable rotation angle cannot be widened. In other words, there is a problem that when the rotational speed ratio cannot be freely set, the detectable rotation angle is significantly limited.
A spin encoder value described in the above-described Japanese Patent No. 3429414 is a virtual encoder calculated by addition of a motor encoder value. The spin encoder value to be finally output does not include a detection result of the rotation angle of the output shaft of the reducer. Therefore, amounts of influence regarding backlashes and torsion and the like of the reducer cannot be detected.